package main.chapter8;

import main.chapter5.equals.Employee;

public class SafeVarargs {
    @java.lang.SafeVarargs static <E> E[] array(E... array){
        return array;
    }

    public static void main(String[] args) {
        Pair<String> pair1 = new Pair<>();
        Pair<String> pair2 = new Pair<>();
        Pair<String>[] table =  array(pair1,pair2);
        Object[]objects = table;
        objects[0] = new Pair<Employee>();
        Pair<String> a = (Pair<String>) objects[0];
    }
}
